package com.shop.api.feign;

import com.shop.Result.LdbzResult;
import com.shop.pojo.LdbzAdminRole;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient(name = "shop-service-admin")
public interface AdminRoleFeign {

    //修改页面跳转
    @RequestMapping(value = "/admin/role/service/editAdminRole/{id}",method = RequestMethod.GET)
    LdbzResult editAdminRole(@RequestParam("id")long id);

    //分页获取系统角色
    @RequestMapping(value = "/admin/role/service/getAdminRolePage",method = RequestMethod.GET)
    LdbzResult getAdminRolePage(@RequestParam("entity")LdbzAdminRole entity,@RequestParam("page")int page,@RequestParam("limit")int limit);

    //获取后台角色的详细信息
    @RequestMapping(value = "/admin/role/service/selectByKey/{id}",method = RequestMethod.GET)
    LdbzResult selectByKey(@RequestParam("id")long id);

    //删除后台角色
    @RequestMapping(value = "/admin/role/service/deleteByKey/{id}",method = RequestMethod.GET)
    LdbzResult deleteByKey(@RequestParam("id")String id);

    //新增角色
    @RequestMapping(value = "/admin/role/service/insertByEntity")
    LdbzResult insertByEntity(@RequestParam("entity")LdbzAdminRole entity);

    //修改角色
    @RequestMapping(value = "/admin/role/service/updateByKey")
    LdbzResult updateByKey(@RequestParam("entity")LdbzAdminRole entity);

    @RequestMapping(value = "/admin/role/service/countAdminUser")
    LdbzResult countAdminUser(@RequestParam("entity")LdbzAdminRole entity);
}
